#! /bin/sh

mirroring=BidiMirroring.txt
make $mirroring >&2

sed -e "s/^\([0-9A-F]*\); *\([0-9A-F]*\).*/  {0x\1, 0x\2},/" \
    -e t -e d $mirroring > mirroring.t

exit $?

# do not combine mirroring and brackets
(
sed -e "s/^\([0-9A-F]*\); *\([0-9A-F]*\); *\([co]\).*/\3 \1 \2/" \
    -e t -e d $brackets
sed -e "s/^\([0-9A-F]*\); *\([0-9A-F]*\).*/x \1 \2/" \
    -e t -e d $mirroring
) | sort -k 2 | uniq  -f 1 |
sed -e "s/^\(.\) \([0-9A-F]*\) \([0-9A-F]*\)/  {0x\2, 0x\3, BRACK\1},/" > mirroring.t

